import {debounce} from './utils'

export const itemListenerMixin = {
  data() {
    return {
      ItemListener: null
    }
  },
  mounted() {
    //1. 防抖
    const refresh = debounce(this.$refs.scroll.refresh, 50)

    this.itemListener = () => {
      refresh()
    }

    this.bus.$on('itemImageLoad', this.itemListener)

    console.log('我是混入中的代码');
  }
}
